﻿using System;
using System.Collections;
using System.Configuration;
using System.Data;
using System.Linq;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.HtmlControls;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Xml.Linq;
using ClassLibrary.DAO;

public partial class usercontrol_ucIMac : System.Web.UI.UserControl
{
    TblItemsDAO ItemsDAO = new TblItemsDAO(Global.CONNECTION_STRING);
    protected void Page_Load(object sender, EventArgs e)
    {
        LoadData("", "", "");
    }
    public void LoadData(string strName, string strCatID, string strOrderby)
    {
        try
        {
            lvIMAc.DataSource = ItemsDAO.GetProduct(0, strName, strCatID, 1, 0, 12, "", 7);
            lvIMAc.DataBind();
        }
        catch (Exception ex)
        {
            Session[Global.SESSION_ERROR] = ex;
            Response.Redirect(Global.ERROR_PAGE, true);
        }
    }
    protected void lvIMAc_PagePropertiesChanged(object sender, EventArgs e)
    {
        lvIMAc.DataBind();
    }
}
